home *** CD-ROM | disk | FTP | other *** search
- /* gmtime.c Turbo C Bible functions, p. 334 */
- #include <stdio.h>
- #include <time.h>
- main()
- {
- time_t tnow;
- struct tm *tmnow;
- time(&tnow);/* Get the time in seconds since 0 hrs GMT, 1/1/70 */
- tmnow = gmtime(&tnow);
- /* Convert it to string showing Greenwich Mean Time */
- printf("Greenwich Mean Time = %s\n", asctime(tmnow));
- }